package com.study.d021css;

import java.net.URL;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

/**
*@description
*@author xtayhame
*date 2020年3月17日
*version
*since v1.0
*/
public class CSSMain extends Application{
	public static void main(String[] args) {
		launch(args);
	}
	@Override
	public void start(Stage stage) throws Exception {
		URL url = FXMLLoader.getDefaultClassLoader().getResource("com/study/d021css/fxml/css.fxml");
		AnchorPane anchorPane = (AnchorPane) FXMLLoader.load(url);

		URL css = FXMLLoader.getDefaultClassLoader().getResource("com\\study\\d021css\\css\\my.css");
		Scene scene=new Scene(anchorPane, 400, 300);
		scene.getStylesheets().add(css.toExternalForm());
		stage.setScene(scene);
		stage.show();

	}
}
